home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group00b.txt / 000097_icon-group-sender_Tue Oct 24 13:25:33 2000.msg < prev    next >
Internet Message Format  |  2001-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9OKPJD24283
  4.     for icon-group-addresses; Tue, 24 Oct 2000 13:25:20 -0700 (MST)
  5. Message-Id: <200010242025.e9OKPJD24283@baskerville.CS.Arizona.EDU>
  6. From: symbiot@my-deja.com
  7. X-Newsgroups: comp.lang.icon
  8. Subject: Re: How to "declare" a string?
  9. Date: Tue, 24 Oct 2000 18:05:48 GMT
  10. To: cheyenne_wills@qwest.net
  11. X-Article-Creation-Date: Tue Oct 24 18:05:48 2000 GMT
  12. X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)
  13. X-Http-Proxy: 1.0 SRVPROXY, 1.0 x63.deja.com:80 (Squid/1.1.22) for client 208.51.185.226
  14. X-MyDeja-Info: XMYDJUIDsymbiot
  15. To: icon-group@cs.arizona.edu
  16. Errors-To: icon-group-errors@cs.arizona.edu
  17. Status: RO
  18. Content-Length: 1562
  19.  
  20. Neat function! Thanks for the suggestion. Any ideas about the the first
  21. question?
  22.  
  23. In article <39F35C09.4A9C93A1@qwest.net>,
  24.   Cheyenne Wills <cheyenne_wills@qwest.net> wrote:
  25. >
  26. > > traditional sense of a programming language. Soooo...uhhh....???
  27. > >
  28. > > As a secondary question, this is part of a program to converst a
  29. string
  30. > > to all uppercase. Right now I'm doing in a WHILE...DO loop. But
  31. > > something tells me there's amcuh more efficient way to do it (with
  32. EVERY
  33. > > perhaps?) Any suggestions?
  34. >
  35. > data := "Some MiXed CaSed Data"
  36. > newdata := map(data,&lcase,&ucase)
  37. >
  38. > --> newdata now contains "SOME MIXED CASED DATA"
  39. >
  40. > The map function searches in the first parameter every instance of
  41. each
  42. > character in the second parameter and replaces that character with a
  43. > character from the third parameter that is in the same "position" as
  44. the
  45. > character in the 2nd...
  46. >
  47. > I hope that sounded clear...
  48. >
  49. > Here is an example:
  50. >
  51. > #                12345   12345
  52. > map("some data","aeiou","!@#$%")  -> "s$m# d!t!"
  53. >
  54. > The above does the following mapping
  55. >
  56. >    a -> !
  57. >    e -> @
  58. >    i -> #
  59. >    o -> $
  60. >    u -> %
  61. >
  62. > You can also use map to rearrange data
  63. > #    mm/dd/yyyy   yyyy/mm/dd   mm/dd/yyyy
  64. > map("123456789A","789A612345","10/21/2000")
  65. >
  66. > Will transform a date in the format of mm/dd/yyyy into yyyy/mm/dd.  It
  67. > uses the third parameter as the "input"
  68. >
  69. > Cheyenne
  70. >
  71.  
  72. --
  73. "Wife who put husband in doghouse, soon find him in cathouse."
  74.                             -- Wisdom of the Tao
  75.  
  76.  
  77. Sent via Deja.com http://www.deja.com/
  78. Before you buy.
  79.